# 指定基础镜像
FROM python:3.9

# 指定镜像的维护者
LABEL maintainer="jackfrued@126.com"

# 设置工作目录
WORKDIR /root

# 从版本控制克隆代码
RUN git clone --depth=1 https://gitee.com/jackfrued/admin_sys 

# 设置工作目录
WORKDIR /root/admin_sys

# 安装项目依赖项
RUN pip install -r requirements.txt -i https://pypi.doubanio.com/simple/

# 容器启动时要执行的命令
ENTRYPOINT ["gunicorn", "-w", "2", "-b", "0.0.0.0", "-p", "8000", "main:app"]

# 暴露端口
EXPOSE 8000
